<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

/**
 * ==================================================================
 * ===========================前端页面部分=============================
 * ==================================================================
 */
Route::group(['namespace' => 'Home'], function () {

    //首页
    Route::get('index', 'Index\IndexController@tag');
    Route::get('searchs', 'Index\IndexController@searchs');

    //首页-（导航 PHP）
    Route::any('phplist', 'Index\booklistsController@lists');
    //首页-（导航 SQL）
    Route::any('sqllist', 'Index\booklistsController@sqlList');
    //首页-（导航 关于我）
    Route::any('about', 'Index\booklistsController@about');
    //首页-（导航 详情）
    Route::get('comment', 'Index\booklistsController@comment');
    //发表评论
    Route::get('comments', 'Index\booklistsController@comments');
    //点赞
    Route::get('click', 'Index\booklistsController@click');

});

/**
 * ================================================================
 */

/**
 * ============================= 后端部分 ===========================
 */

Route::group(['namespace'=>'Admin'], function () {
    //后台首页
    Route::get('admin', 'Index\Index@index');
    Route::get('welcome', function () {
        return view('Admin/Index/welcome');
    });
    //标签列表
    Route::any('taglist', 'Tag\TagController@tagList');
    //添加标签
    Route::any('addtag', 'Tag\TagController@add_tag');
    //删除标签
    Route::get('adddel/{id}', 'Tag\TagController@tag_del');

    //文章添加
    Route::any('bookadd', 'Article\BookaddController@Bookadd');
    Route::any('Add', 'Article\BookaddController@Add');
    //文章列表
    Route::any('booklist', 'Article\BookaddController@Booklist');
    //文章删除
    Route::get('bookdel/{id}', 'Article\BookaddController@Bookdel');

    //友情链接列表
    Route::any('linklist', 'Links\LinkController@linkList');
    //删除友情链接
    Route::get('linkdel/{id}', 'Links\LinkController@linkDel');

});

